import xmlrpclib

server = xmlrpclib.Server('http://mac-mini.local/svn/braindump/trunk/xmlrpc.php')

try:
  while 1:
  
    one = raw_input('> ')
    print 'is to'
    two = raw_input('> ')
    print 'as'
    three = raw_input('> ')
    print 'is to'
  
    rel = server.graph.between(one,two)
    answer = server.graph.get(three,rel)
  
    if not answer:
      answer = server.graph.backlinks(three)[rel]
    
    print '> '+answer+"\n"
    
except KeyboardInterrupt:
  print "\nbye!"
